<div class="row">
  <form role="form" accept-charset="UTF-8" action="/admin/devote" method="GET">
    <div class="col-lg-3">
      <div class="form-group">
        <label>手机</label>
        <input class="form-control" name="phone" value="{{ query.phone }}">
      </div>
    </div>
    <div class="col-lg-3 col-lg-offset-6" style="padding-top: 19px;">
      <div class="form-group">
        <button type='submit' class="btn btn-info col-lg-8 pull-right">搜索</button>
      </div>
    </div>
  </form>
</div>
<hr>

<div class="row">
  <div class="col-lg-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        用户管理
      </div>
      <!-- /.panel-heading -->
      <div class="panel-body">
        <div class="table-responsive">
          <table class="table table-striped">
            <thead>
              <tr>
                  <th>手机</th>
                  <th>用户</th>
                  <th>一级用户</th>
                  <th>二级用户</th>
                  <th>三级用户</th>
              </tr>
            </thead>
            <tbody>
              {{#each customers.rows}}
                <tr>
                    <td>{{ customer.phone }}</td>
                    <td><img src="{{customer.headimgurl}}" onError="this.src='http://placehold.it/380x380';" style="width: 36px;">{{ customer.username }}</td>
                    {{#each result}}
                    <td>{{#if count }} {{ count }}  {{else}} 0 {{/if}} 人</td>
                    {{/each}}
                </tr>
              {{/each}}
            </tbody>
          </table>
        </div>
        <!-- /.table-responsive -->
      </div>

      <div class="panel-footer">
          {{pagination customers (addParams '/admin/devote' query)}}
      </div>
      <!-- /.panel-body -->
    </div>
    <!-- /.panel -->
  </div>
</div>